﻿<phone:PhoneApplicationPage 
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
	xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:vd="clr-namespace:VirtualDreams.Turnstile;assembly=VirtualDreams.Turnstile"
	mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="800"
	x:Class="OttawaTourMap.ToursListPage"
	FontFamily="{StaticResource PhoneFontFamilyNormal}"
	FontSize="{StaticResource PhoneFontSizeNormal}"
	Foreground="{StaticResource PhoneForegroundBrush}"
	Orientation="Portrait"
	shell:SystemTray.IsVisible="True">
    <phone:PhoneApplicationPage.Resources>
        <DataTemplate x:Key="tourTemplate">
            <Grid HorizontalAlignment="Left" Height="256" VerticalAlignment="Top" Width="462">
                <StackPanel Orientation="Horizontal" Width="458" Margin="2,0" Height="57" VerticalAlignment="Top">
                    <Image Name="thumbNailImage" Source="{Binding ThumbNailURI}"  Width="100" Loaded="thumbNailImage_Loaded" Margin="0,7,0,-21" />
                    <TextBlock Text="{Binding title}" TextWrapping="Wrap" VerticalAlignment="Top" Width="323" Height="49" HorizontalAlignment="Left"/>
                    <Grid Margin="0,11,0,0" Width="27" Height="29" VerticalAlignment="Top">
                        <Ellipse Fill="{StaticResource PhoneAccentBrush}" Stroke="{StaticResource PhoneAccentBrush}"  RenderTransformOrigin="0.462,0.714" Margin="0,0,-1,0"/>
                        <TextBlock Text="{Binding language}"  Margin="3,-2,1,2" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                    </Grid>
                </StackPanel>
                <TextBlock Text="{Binding author}" TextWrapping="Wrap" Style="{StaticResource PhoneTextAccentStyle}" Height="30" HorizontalAlignment="Left" Margin="104,56,0,0" Width="343" FontSize="12" VerticalAlignment="Top"/>
                <TextBlock TextWrapping="Wrap" Style="{StaticResource PhoneTextSmallStyle}" Margin="11,87,2,16" FontSize="18.667"><Run Text="&#xa;            The “Regroupement des organismes du patrimoine franco-ontarien” (ROPFO) invites            you to discover Lowertown, Ottawa’s most "/><Run Text="h"/><Run Text="istorically rich neighbourhood. By following"/><Run Text=" "/><Run Text="this walking tour, you will experience the architectural and historical wealth of this&#xa;            area of the city where francophone heritage resounds. Discover Ottawa’s Lowertown, as it&#xa;            opens the door to the region’s considerable history and heritage. The construction of&#xa;            the Rideau Canal from 1826 to 1832, under the direction of Lieutenant Colonel John By,&#xa;            dramatically changed the face of the Ottawa River’s south bank, which was still&#xa;            undeveloped at the beginning of the 19th century. The development of the canal prompted&#xa;            an influx of tradesmen and led to the rapid expansion of Bytown. Renamed Ottawa in 1855,&#xa;            the city was declared the Capital of Canada by Queen Victoria two years later. Prior to&#xa;            its emergence as an administrative centre, Ottawa was primarily an industrial city, with&#xa;            the logging industry playing a prominent role. The Francophones who arrived during the&#xa;            construction of the Rideau Canal and the Parliament Buildings (1860) settled in&#xa;            Lowertown and created a significant French- Canadian presence in Ottawa.&#xa;        "/></TextBlock>
            </Grid>
        </DataTemplate>
    </phone:PhoneApplicationPage.Resources>


    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" DataContext="{Binding Source={StaticResource OttawaSampleDataSource}}">
        <Grid.Background>
            <LinearGradientBrush EndPoint="0.5,1" MappingMode="RelativeToBoundingBox" StartPoint="0.5,0">
                <GradientStop Color="#FF06151D" Offset="0.181"/>
                <GradientStop Color="#FF09164B" Offset="1"/>
            </LinearGradientBrush>
        </Grid.Background>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <!--TitlePanel contains the name of the application and page title-->
        <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
            <TextBlock x:Name="ApplicationTitle" Text="Tour List" Style="{StaticResource PhoneTextNormalStyle}"/>

        </StackPanel>

        <!--ContentPanel - place additional content here-->
        <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0" Loaded="ContentPanel_Loaded">
            <vd:Turnstile x:Name="TourInfoList" >
                <ListBox x:Name="toursListBox" ItemTemplate="{StaticResource tourTemplate}" ItemsSource="{Binding tourCollection}" SelectionChanged="ListBox_SelectionChanged" Margin="-8,0,8,0">

                </ListBox>
            </vd:Turnstile>

        </Grid>
    </Grid>
</phone:PhoneApplicationPage>